package com.zhuang.chapter14.work03;

import java.util.Arrays;

public class PrintArray {
	public static void main(String[] args) {
		Integer[] intArray = { 1, 2, 3, 4, 5 };
		Double[] doubleArray = { 1.1, 2.2, 3.3, 4.4 };
		Character[] charArray = { 'H', 'E', 'L', 'L', 'O' };
		String[] stringArray = { "小明", "小红", "小兰" };
		System.out.println("整型数组元素为:");
		printArray(intArray);
		System.out.println("\n双精度型数组元素为:");
		printArray(doubleArray);
		System.out.println("\n字符型数组元素为:");
		printArray(charArray);
		System.out.println("\n字符串数组元素为:");
		printArray(stringArray);
	}

	public static <T> void printArray(T[] array) {
		System.out.println(Arrays.toString(array));
	}
}
